package thread;

public class SleepTest1 {
    public static void main(String[] args) {
        SleepTest1 main = new SleepTest1();
        main.startThread();
    }

    /**
     * 启动线程
     */
    public void startThread() {
        Thread t = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("开始执行线程。。。");
                System.out.println("进入睡眠状态。。。");
                try {
                    Thread.sleep(3000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println("线程结束。。。");
            }
        });
        t.start();
    }
}